import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('../layout/index.vue'),
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import('../views/Home.vue')
        },
        {
          path: '/pengdingorder',
          name: 'pengdingorder',
          component: () => import('../views/PendingOrder.vue')
        },
        {
          path: '/table',
          name: 'table',
          component: () => import('../views/Table.vue')
        },
        {
          path: '/food',
          name: 'food',
          component: () => import('../views/Foods.vue')
        },
        {
          path:'/setmeal',
          name: 'setmeal',
          component:()=> import('../views/SetMeal.vue')
        },
        {
          path: '/about',
          name: 'about',
          component: () => import('../views/AboutView.vue')
        },
        {
          path: '/ordermanagement',
          name: 'ordermanagement',
          component: () => import('../views/OrderManagement.vue')
        },
        {
          path: '/inventorymanagement',
          name: 'inventorymanagement',
          component: () => import('../views/InventoryManagement.vue')
        },
        {
          path: '/payment',
          name: 'payemnt',
          component: () => import('../views/Payment.vue')
        },
        {
          path: '/refund',
          name: 'refund',
          component: () => import('../views/Refund.vue')
        },
        {
          path: '/category',
          name: 'category',
          component: () => import('../views/CategoryView.vue')
        }
      ]
    },

  ]
})

export default router